home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 January / Macworld (1998-01).dmg / Serious Demos / Visual MacStandardBasic Demo / Samples / Controls Demo / Form1 < prev    next >
Text File  |  1997-09-29  |  4KB  |  265 lines

  1. MacStandardBasic Form Version 3.0
  2.  
  3.     FormBegin
  4.       Name=Form1
  5.       Title=Control Demo
  6.       Left=100
  7.       Top=50
  8.       Width=377
  9.       Height=308
  10.       Sub Proc.=Form1_Event
  11.       Visible=1
  12.       Style=5
  13.       Enabled=1
  14.       Font=Geneva
  15.       FontSize=12
  16.       FontStyle=0
  17.       Show Grid=1
  18.       Grid Snap=1
  19.       Grid Size=8
  20.       Min. Width=100
  21.       Max. Width=2000
  22.       Min. Height=100
  23.       Max. Height=2000
  24.       AutoCenter=0
  25.       ForeColor=0 0 0
  26.       BackColor=65535 65535 65535
  27.     FormEnd
  28.  
  29.     ControlBegin=Label
  30.       Name=Label1
  31.       Text=Event:
  32.       Left (x)=24
  33.       Top (y)=16
  34.       Width=40
  35.       Height=16
  36.       Sub Proc.=None
  37.       Visible=1
  38.       Enabled=1
  39.       Font=Geneva
  40.       FontSize=12
  41.       FontStyle=0
  42.       Opt20=1
  43.       ForeColor=0 0 0
  44.       BackColor=65535 65535 65535
  45.     ControlEnd
  46.  
  47.     ControlBegin=Label
  48.       Name=Label2
  49.       Text=
  50.       Left (x)=72
  51.       Top (y)=16
  52.       Width=201
  53.       Height=17
  54.       Sub Proc.=None
  55.       Visible=1
  56.       Enabled=1
  57.       Font=Geneva
  58.       FontSize=12
  59.       FontStyle=0
  60.       Opt20=2
  61.       ForeColor=0 0 0
  62.       BackColor=65535 65535 65535
  63.     ControlEnd
  64.  
  65.     ControlBegin=Radio
  66.       Name=Radio1
  67.       Text=Radio1
  68.       Left (x)=32
  69.       Top (y)=72
  70.       Width=72
  71.       Height=16
  72.       Sub Proc.=Radio1_Click
  73.       Visible=1
  74.       Value=1
  75.       Enabled=1
  76.       PgUpDn=1
  77.       Opt20=1
  78.     ControlEnd
  79.  
  80.     ControlBegin=Radio
  81.       Name=Radio2
  82.       Text=Radio2
  83.       Left (x)=32
  84.       Top (y)=96
  85.       Width=72
  86.       Height=24
  87.       Sub Proc.=Radio2_Click
  88.       Visible=1
  89.       Value=0
  90.       Enabled=1
  91.       PgUpDn=1
  92.       Opt20=2
  93.     ControlEnd
  94.  
  95.     ControlBegin=CheckBox
  96.       Name=CheckBox1
  97.       Text=CheckBox1
  98.       Left (x)=32
  99.       Top (y)=136
  100.       Width=120
  101.       Height=24
  102.       Sub Proc.=CheckBox1_Click
  103.       Visible=1
  104.       Value=0
  105.       Enabled=1
  106.       Opt20=1
  107.     ControlEnd
  108.  
  109.     ControlBegin=DropList
  110.       Name=DropList1
  111.       Text=Item1|Item2|Item3
  112.       Left (x)=32
  113.       Top (y)=176
  114.       Width=120
  115.       Height=20
  116.       Sub Proc.=DropList1_Click
  117.       Visible=1
  118.       Value=0
  119.       Enabled=1
  120.       Opt20=1
  121.     ControlEnd
  122.  
  123.     ControlBegin=Button
  124.       Name=Button1
  125.       Text=Button1
  126.       Left (x)=256
  127.       Top (y)=240
  128.       Width=97
  129.       Height=33
  130.       Sub Proc.=Button1_Click
  131.       Visible=1
  132.       Value=0
  133.       Enabled=1
  134.       Opt20=1
  135.     ControlEnd
  136.  
  137.     ControlBegin=Icon
  138.       Name=Icon1
  139.       Left (x)=24
  140.       Top (y)=224
  141.       Width=57
  142.       Height=57
  143.       Sub Proc.=Icon1_Click
  144.       Visible=1
  145.       Value=2000
  146.       Enabled=1
  147.       Opt20=1
  148.       Frame=0
  149.     ControlEnd
  150.  
  151.     ControlBegin=Picture
  152.       Name=Picture1
  153.       Left (x)=184
  154.       Top (y)=48
  155.       Width=144
  156.       Height=112
  157.       Sub Proc.=Picture1_Click
  158.       Visible=1
  159.       Value=2500
  160.       Enabled=1
  161.       Opt20=1
  162.       Frame=0
  163.     ControlEnd
  164.  
  165.     ControlBegin=ScrollBar
  166.       Name=ScrollBar1
  167.       Left (x)=112
  168.       Top (y)=240
  169.       Width=120
  170.       Height=16
  171.       Sub Proc.=ScrollBar1_Click
  172.       Visible=1
  173.       Value=1
  174.       Enabled=1
  175.       Min. Value=1
  176.       Max. Value=10
  177.       PgUpDn=2
  178.       Opt20=1
  179.     ControlEnd
  180.  
  181. Start
  182.     Dim A
  183.  
  184.     CreateTheMenus
  185.     Form Form1
  186.  
  187.     A=0
  188.     Do While A=0
  189.     Loop
  190. Finish
  191.  
  192. Sub CreateTheMenus( )
  193.     MenuApple
  194.     MenuAddItem 1, "About Controls Demo", "", AboutTheApp
  195.     MenuDesk
  196.     MenuAdd 2, "File", None
  197.     MenuAddItem 2, "Quit", "Q", QuitTheApp
  198.  
  199. EndSub
  200.  
  201. Sub QuitTheApp( )
  202.     End
  203. EndSub
  204.  
  205. Sub AboutTheApp( )
  206.     Dim a
  207.     a = MsgBox ("Controls Demo"+chr(13), 0)
  208. EndSub
  209.  
  210. Sub Form1_Event( )
  211.     If EventCode(0) = 1 Then CtlText Label2, "Window area selected",0
  212.  
  213.  
  214. EndSub
  215.  
  216. Sub Radio1_Click( )
  217.     CtlText Label2, "Radio1 selected",0
  218.  
  219.  
  220.  
  221. EndSub
  222.  
  223. Sub Radio2_Click( )
  224.     CtlText Label2, "Radio2 selected",0
  225.     
  226.  
  227.  
  228. EndSub
  229.  
  230. Sub CheckBox1_Click( )
  231.         CtlText Label2, "Checkbox1 selected",0
  232.  
  233.  
  234. EndSub
  235.  
  236. Sub DropList1_Click( )
  237.     CtlText Label2, "Item"+Str(CtlValue(DropList1),0)+" of DropList1 selected",0
  238.     
  239.  
  240. EndSub
  241.  
  242. Sub Button1_Click( )
  243.     CtlText Label2, "Button1 selected",0
  244.       
  245. EndSub
  246.  
  247. Sub Picture1_Click( )
  248.     CtlText Label2, "Picture1 selected",0
  249.     
  250. EndSub
  251.  
  252. Sub Icon1_Click( )
  253.     CtlText Label2, "Icon1 selected",0
  254.  
  255.  
  256. EndSub
  257.  
  258. Sub ScrollBar1_Click( )
  259.     CtlText Label2, "ScrollBar1 set to "+Str(CtlValue(Scrollbar1),0),0
  260.  
  261.  
  262.  
  263. EndSub
  264.  
  265.